import operator

list1 = ['我', '爱', '你', 99, '美丽', '的', '']
print(list1)
a = list1
list1.append('中国')
print(list1)
print(a)
del list1[3]
print(list1)
print(len(list1))
list2 = [1, 2, 3, 4]
print('[::-1]:' + str(list2[::-1]))
print(list2[::1])  # 倒序
list3 = [11, 22, 33, 44]
list2[0:2] = [8, 9]  # 替换前2个
print(list2 + list3)
print('*' * 100)
list1.insert(3, 99)
print('99' in list1)
print(99 in list1)
for x in list1:
    print(x)
print('max value: ' + str(max(list2)))
print('cmp结果:' + str(operator.le(list2, list3)))

print('列表推导式')
list_test = [i for i in range(5)]
print(list_test)
